title = "app"
url = "/app"
description = "app下载页"
is_hidden = 0
==
<?php
use Summer\Hjd\Models\Settings as HjdSettings;

function onStart(){
    $hjd_settings= HjdSettings::instance();
    $this['logo']=$hjd_settings->hot_logo->path??'';
    $this['version']=$hjd_settings->hot_version;
    $this['hot_app_path']=$hjd_settings->hot_app->path??'';
    $this['app_name']=$hjd_settings->hot_name;
}
?>
==
<html lang="zh" style="font-size: 342.5%;">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <script src="{{ 'assets/appdown/static/js/jquery-1.9.1.min.js'|theme }}"></script>
    <script src="{{ 'assets/appdown/static/js/jquery-qrcode.min.js'|theme }}"></script>
    <link rel="stylesheet" href="{{ 'assets/appdown/static/css/main.css'|theme }}">
    <style>
    </style>
    <title>App下载</title>
</head>
<body style="padding-top: 0px;" class="">
<div class="template-2 template-wrap">
    <div class="t-bg-2"></div>
    <div class="container">
        <div class="content">
            <div class="template-common">
                <div class="t-icon">
                    <img src="{{logo}}" class="img-responsive">
                </div>
                <div class="t-name">
                    <div class="tit">{{ app_name }}</div>
                    <div class="name-info pc-pwd">
                        <span>版本 {{version}}</span>
                    </div>
                </div>

                <div class="template-btn-wrap">
                    <a href="{{ hot_app_path }}"  type="ios" class="ms-btn template-btn clearfix pc-pwd down_load">
                        <span class="icon-36 iconfont fl"></span>
                        <span class="fl">
                        下载安装
                    </span>
                    </a>
                </div>
                <div class="t-apply pc-pwd shuoming">
                    适用于安卓手机
                </div>


                <div class="t-code pc-pwd qcode">

                </div>
                <div class="code-text" style="text-align: center;">扫描二维码下载</div>
            </div>
        </div>
    </div>
</div>

<div id="weixin_ios" style="display:none;">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1">
            <img src="{{ 'assets/appdown/static/picture/click_btn.png'|theme }}">
        </span>
        <span class="span2">
            <em>1</em> 点击右上角
            <img src="{{ 'assets/appdown/static/picture/menu.png'|theme }}">
            打开菜单
        </span>
        <span class="span2">
            <em>2</em> 选择
            <img src="{{ 'assets/appdown/static/picture/safari.png'|theme }}">
            用Safari打开下载
        </span>
    </div>
</div>
<div id="weixin_android" style="display: none;">
    <div class="click_opacity"></div>
    <div class="to_btn"><span class="span1">
            <img src="{{ 'assets/appdown/static/picture/click_btn.png'|theme }}">
        </span>
        <span class="span2">
            <em>1</em> 点击右上角
            <img src="{{ 'assets/appdown/static/picture/menu_android.png'|theme }}">
            打开菜单
        </span>
        <span class="span2 android_open">
            <em>2</em> 选择
            <img src="{{ 'assets/appdown/static/picture/android.png'|theme }}">
        </span>
    </div>
</div>
<script>
    var ua = navigator.userAgent.toLowerCase();
    var Sys = {};
    var s;
    (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;

    //判断设备是否为iPhone
    if (/(iPhone|iPad|iPod|iOS)/i.test(ua)) {

        $(".shuoming").html('暂不支持苹果手机');
        // if (Sys.safari) {
        //     $(".down_load").attr("href",'');
        //     $(".down_load").click(function(event) {
        //         setTimeout(function(){
        //             if( confirm){
        //                 location.href = "";
        //             }
        //         },4000)
        //     });
        // }else{
        //     $("#weixin_ios").show();
        // }
    }else{
        $(".shuoming").html('适用于安卓手机');
        //判断是否QQ内置浏览器
        if(ua.indexOf(' qq')>-1 && ua.indexOf('mqqbrowser') <0){
            $(".down_load").attr("href",'###');
            $("#weixin_android").show();
        }
        //在微信中打开
        else if (ua.match(/MicroMessenger/i) == "micromessenger") {
            $(".down_load").attr("href",'###');
            $("#weixin_android").show();
        }
        //判断Android
        // else{
        //     $(".down_load").attr("href",'http://img.whzbswkj.com/zbyy/73957410.apk');
        // }
    }


</script>

<script type="text/javascript">
    let httpurl = window.location.href;
    // qrcode($('.qcode'),300,'');
    qrcode($('.qcode'),300,httpurl);
    /**
     * @param  {[type]} qrCodeDiv   [description]
     * @param  {[type]} size        [description]
     * @param  {[type]} text        [description]
     * @return {[type]}             [description]
     */
    function qrcode(qrCodeDiv,size,text)
    {
        var option = {
            render:'image',
            minVersion:1,
            maxVersion:40,
            ecLevel: 'L',
            minVersion:5,
            left:0,
            top:0,
            size:size,
            fill:'#000',
            background:'#fff',
            text: text,
            radius:0,
            quiet:0,
            mode:4,
            mSize:0.15,
            mPosX:0.5,
            mPosY:0.5,
            image:null
        }

        $(qrCodeDiv).qrcode(option);
    }
</script>
</body></html>